@mixin flex-center($direction: row) {
    display: flex;
    flex-direction: $direction;
    align-items: center;
    justify-content: center;
}

@mixin round($d) {
    width: $d;
    height: $d;
    border-radius: 50%;
}

@mixin box-shadow {
    box-shadow: 0 2px 8px 0 rgba($color: #000, $alpha: 0.2);
}

@mixin text-ellipsis() {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@mixin text-ellipsis-multi($line) {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: $line;
    -webkit-box-orient: vertical;
}

@mixin abs-stretch() {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
}

@mixin abs-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@mixin list($item-wdith) {
    .list-wrap {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -12px;

        .list-item {
            width: $item-wdith;
            margin-bottom: 36px;
            padding: 0 12px;
        }
    }
}

@mixin img-wrap($width, $height: $width) {
    width: $width;
    height: $height;
    flex-shrink: 0;

    img {
        width: 100%;
        height: 100%;
    }
}